//
//  YSCategoryDataTool.h
//  Yueshi
//
//  Created by Northwan on 15/9/7.
//  Copyright (c) 2015年 悦食中国. All rights reserved.
//

#import "BaseDataTool.h"
#import "YSCategoryRes.h"
#import "YSProductListRes.h"
#import "YSBusinessRes.h"
#import "SearchThinkKeys.h"
#import "ProductSearch.h"
#import "YSSearchRes.h"
#import "YSVipCategorieRes.h"
#import "YSVipServiceDetailRes.h"

@interface YSCategoryDataTool : BaseDataTool
/**
 *  获取分类信息
 *
 *  @param success
 *  @param failure
 */
+ (void)getCategoryInfo:(void (^)(YSCategoryRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取列表信息
 *
 *  @param entryId   商品分类 id 或者池子id 更具下面参数判断
 *  @param type      类型 1品牌，2分类，3池子。
 *  @param pageIndex 第几页， 0 null 为首页。下一页加一
 *  @param sortFile  排序字段，价格：price，销量：sales,人气：popularity.
 *  @param seque     降序 desc , 升序 asc
 *  @param success
 *  @param failure
 */
+ (void)getProductList:(NSInteger)entryId type:(NSInteger)type pageIndex:(NSInteger)pageIndex sortFile:(NSString *)sortFile seque:(NSString *)seque success:(void (^)(YSProductListRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取商户信息
 *
 *  @param supplierId 商户id
 *  @param pageIndex  页码
 *  @param success
 *  @param failure
 */
+ (void)getBusinessWithSupplierId:(NSInteger)supplierId pageIndex:(NSInteger)pageIndex success:(void(^)(YSBusinessRes *result))success failure:(void(^)(NSError *error))failure;

+ (void)searchThinkKeysWithParam:(NSString *)param success:(void (^)(SearchThinkKeys *result))success failure:(void (^)(NSError *error))failure;

+ (void)searchProductDataWithKeyWords:(NSString *)keyWords pageIndex:(NSInteger)pageIndex success:(void (^)(ProductSearch *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取搜索结果
 *
 *  @param keywords 关键字
 *  @param searchType  0 首页搜索 ，1 为商品搜索， 2 未文章搜索
 *  @param pageIndex  页码
 *  @param success
 *  @param failure
 */
+ (void)searchDataWithKeywords:(NSString *)keywords searchType:(NSInteger)searchType pageIndex:(NSInteger)pageIndex success:(void (^)(YSSearchRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  VIP 列表
 *
 *  @param pageIndex 页码
 *  @param success
 *  @param failure
 */
+ (void)loadVipList:(NSInteger)pageIndex success:(void(^)(YSVipCategorieRes *result))success failure:(void(^)(NSError *error))failure;
/**
 *  验证VIP 邀请码
 *
 *  @param pageIndex
 *  @param success
 *  @param failure
 */
+ (void)validVipCode:(NSString *)code success:(void(^)(BaseResponse *result))success failure:(void(^)(NSError *error))failure;
/**
 *  vip定制详情
 *
 *  @param advertId 列表页id
 *  @param success
 *  @param failure
 */
+ (void)loadVipServiceDetail:(NSInteger)advertId success:(void(^)(YSVipServiceDetailRes *result))success failure:(void(^)(NSError *error))failure;
@end
